package org.leo.study.elasticsearch.models.es.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 *
 * </p>
 *
 * @Package: org.leo.study.elasticsearch.models.es.entiy
 * @ClassName: MerchandiseEntiy
 * @author: Li.Junlin
 * @date: 2019.11.13 14:47
 */
@Data
@Document(indexName = "item",type = "docs", shards = 1, replicas = 0)
public class MerchandiseEntity {
    @Id
    private Long id;
    /**
     * 标题
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;
    /**
     * 分类
     */
    @Field(type = FieldType.Keyword)
    private String category;
    /**
     * 品牌
     */
    @Field(type = FieldType.Keyword)
    private String brand;
    /**
     * 价格
     */
    @Field(type = FieldType.Keyword)
    private Double price;
    /**
     * 图片地址
     */
    @Field(type = FieldType.Keyword)
    private String images;
}
